<template>
	<view class="login-body">
		 <LoginByPass v-if="loginType">
			 <span @click="checkOut" class="">
			 	{{typeTitle}}
			 </span>
		 </LoginByPass>
		 <LoginByCode v-else>
			  <span @click="checkOut" class="">
			  	{{typeTitle}}
			  </span>
		 </LoginByCode>
	</view>
</template>

<script>
	import LoginByPass from '@/components/login/loginByPass.vue'
	import LoginByCode from '@/components/login/loginByCode.vue'
	export default {
		components:{
			LoginByPass,LoginByCode
		},
		data() {
			return {
				loginType:true
			 
			}
		},
		
		computed:{
		   typeTitle(){
			   return this.loginType ? '验证码登录' : '密码登录';
		   }
		},
		 
		methods: {
			checkOut(){
				
				this.loginType=!this.loginType;
				
			}
			 
  
		}
	}
</script>

<style lang="less">

	page{
		background-color: #f9f9f9;
	}
	.login-body{
		width: 100%;
		background: url('/static/images/login-bg.png') no-repeat;
		background-size: 100% auto;
		padding: 115rpx 32rpx 0rpx 32rpx;
		box-sizing: border-box;
		
	}

</style>